package com.sunc.demo.order.configs;


import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class OperationLogAspect {

    @Pointcut("@annotation(com.sunc.demo.order.configs.OperationLog)")
    public void pointCut(){

    }


    @Before("pointCut()")
    public void insert(JoinPoint joinPoint){
        System.out.println("========"+joinPoint.getArgs().toString());
    }
//    @Around("pointCut()")
//    public void insert(ProceedingJoinPoint joinPoint){
//        System.out.println("========"+joinPoint.getArgs().toString());
//    }

}
